#pragma warning(disable: 4251)
#pragma warning(disable: 4786)
#pragma warning(disable: 4290)

#include <iostream>
#include "fedAmb1516.h"

using namespace std;

extern void appendText(const wchar_t* text);

FederateAmbassador::FederateAmbassador(void) {}

FederateAmbassador::~FederateAmbassador()
   throw () {}


void FederateAmbassador::objectInstanceNameReservationSucceeded(
   std::wstring const & theObjectInstanceName)
{
	appendText(theObjectInstanceName.c_str());
   wcout << L"objectInstanceNameReservationSucceeded: "
         << theObjectInstanceName.c_str() << endl;

}

void FederateAmbassador::objectInstanceNameReservationFailed(
   std::wstring const & theObjectInstanceName)
{
   wcout << L"objectInstanceNameReservationFailed: "
         << theObjectInstanceName.c_str() << endl;

}

void FederateAmbassador::discoverObjectInstance (
   std::wstring const & theObjectInstanceName)
{
	appendText(theObjectInstanceName.c_str());
   wcout << L"discoverObjectInstance: "
         << theObjectInstanceName.c_str();
}

void FederateAmbassador::reflectAttributeValues (std::wstring const & theObjectInstanceName)
{
	appendText(theObjectInstanceName.c_str());
}

void FederateAmbassador::receiveInteraction()
{
   //wcout << L"receiveInteraction: "
   //      << theInteraction.toString() << L" "
   //      << DtToWString(tag)  << L" "
   //      << (sentOrder == RECEIVE ? L"RECEIVE " : L"TIMESTAMP ")
   //      << (theType == RELIABLE ? L"RELIABLE " : L"BEST_EFFORT ")
   //      << theTime.toString() << L" "
   //      << (receivedOrder == RECEIVE ? L"RECEIVE " : L"TIMESTAMP ")
   //      << L"#regions: " << theSentRegionHandleSet.size() << L" "
   //      << L"#parameters: " << theParameterValues.size() << endl;

   //printParamValues(theParameterValues);
}

 void FederateAmbassador::removeObjectInstance()
 {
   //const char* tag = theUserSuppliedTag.size()
   //   ? (const char*)theUserSuppliedTag.data() : "";

   //wcout << L"removeObjectInstance: "
   //      << myData.objectInstanceMap[theObject].c_str() << L"("
   //      << theObject.toString().c_str() << L") "
   //      << DtToWString(tag)  << L" "
   //      << (sentOrder == RECEIVE ? L"RECEIVE " : L"TIMESTAMP ")
   //      << theTime.toString().c_str() << L" "
   //      << (receivedOrder == RECEIVE ? L"RECEIVE " : L"TIMESTAMP ")
   //      << theHandle.toString().c_str()  << endl;
}
